package team.gs.model;

import android.app.ProgressDialog;

public class ProcessBarAction {
	private static ProgressDialog progress;
	private static String mWaitingMsg = "Vui lòng chờ ...";

	public static void progressHide() {
		if (progress != null)
			progress.dismiss();
	}

	public static boolean processisShowing() {
		if (progress.isShowing()) {
			return true;
		} else {
			return false;
		}
	}

	public static void progressShow() {
		progress = new ProgressDialog(Share.activity);
		progress.setCancelable(false);
		progress.setTitle(null);
		progress.setIndeterminate(true);
		progress.setMessage(mWaitingMsg);
		progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
		progress.show();
	}

	public static void setText(String s) {
		progress.setMessage(s);
	}
}
